/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package queenb.web.crm.store;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import oracle.jdbc.OracleTypes;
import queenb.net.datacontrol.DataStatement;
import queenb.net.datacontrol.Param;
import queenb.net.entitybean.N100;
import queenb.web.crm.inteface.CustomerInf;
import queenb.web.store.EmployeeStore;
import queenb.web.util.PackageContants;

/**
 *
 * @author Thanh Luan
 */
public class CustomerStore extends N100 implements CustomerInf {

    @Override
    public int updateN100By(int pn100, int fn600, int fk100, int fh200, String nv102, String nv103, int ni104, int ni105, String nv106, String nv107, String nv108, String nv109, String nv110, String nv111, String nv112, String nv113, int nv114, String nv115, String nv116, int nv117, Date pdND118, String nv119, String nv122, String nv123,
            Date nd124,
            Date nd125,
            String nv126, String nv127, String nv129, String nv130,Date ND131, int fh000, int pnFn550, int fk300, int fk350, String pnLogin) {
        try {
            DataStatement dateStatement = new DataStatement(PackageContants.UPDATE_N100, OracleTypes.INTEGER, new Param[]{
                        new Param(OracleTypes.INTEGER, pn100),
                        new Param(OracleTypes.INTEGER, fn600),
                        new Param(OracleTypes.INTEGER, fk100),
                        new Param(OracleTypes.INTEGER, fh200),
                        new Param(OracleTypes.CHAR, nv102),
                        new Param(OracleTypes.CHAR, nv103),
                        new Param(OracleTypes.INTEGER, ni104),
                        new Param(OracleTypes.INTEGER, ni105),
                        new Param(OracleTypes.CHAR, nv106),
                        new Param(OracleTypes.CHAR, nv107),
                        new Param(OracleTypes.CHAR, nv108),
                        new Param(OracleTypes.CHAR, nv109),
                        new Param(OracleTypes.CHAR, nv110),
                        new Param(OracleTypes.CHAR, nv111),
                        new Param(OracleTypes.CHAR, nv112),
                        new Param(OracleTypes.CHAR, nv113),
                        new Param(OracleTypes.INTEGER, nv114),
                        new Param(OracleTypes.CHAR, nv115),
                        new Param(OracleTypes.CHAR, nv116),
                        new Param(OracleTypes.INTEGER, nv117),
                        new Param(OracleTypes.DATE, pdND118),
                        new Param(OracleTypes.CHAR, nv119),
                        new Param(OracleTypes.CHAR, nv122),
                        new Param(OracleTypes.CHAR, nv123),
                        new Param(OracleTypes.DATE, nd124),
                        new Param(OracleTypes.DATE, nd125),
                        new Param(OracleTypes.CHAR, nv126),
                        new Param(OracleTypes.CHAR, nv127),
                        new Param(OracleTypes.CHAR, nv129),
                        new Param(OracleTypes.CHAR, nv130),
                          new Param(OracleTypes.DATE, ND131),
                        new Param(OracleTypes.INTEGER, fh000),
                        new Param(OracleTypes.INTEGER, pnFn550),
                        new Param(OracleTypes.INTEGER, fk300),
                        new Param(OracleTypes.INTEGER, fk350),
                       
                        new Param(OracleTypes.CHAR, pnLogin),});

            return super.update(dateStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }
    }

    public int NewRegistration(
            int pnFH000, int pnFH200, int pnFK100, int pnFN600, String pvNV101,
            String pvNV102, String pvNV103, String pvNV105, String pvNV106, String pvNV107,
            String pvNV119, String pvNV122, String pvLOGIN) throws SQLException, InstantiationException, IllegalAccessException {

        DataStatement dateStatement = new DataStatement(PackageContants.NEW_REGISTRATION, OracleTypes.INTEGER, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.INTEGER, pnFK100),
                    new Param(OracleTypes.INTEGER, pnFN600),
                    new Param(OracleTypes.CHAR, pvNV101),
                    new Param(OracleTypes.CHAR, pvNV102),
                    new Param(OracleTypes.CHAR, pvNV103),
                    new Param(OracleTypes.CHAR, pvNV105),
                    new Param(OracleTypes.CHAR, pvNV106),
                    new Param(OracleTypes.CHAR, pvNV107),
                    new Param(OracleTypes.CHAR, pvNV119),
                    new Param(OracleTypes.CHAR, pvNV122),
                    new Param(OracleTypes.CHAR, pvLOGIN)});
        return super.update(dateStatement, N100.class);

    }

    @Override
    public int deleteEmployee(int pn100, String pnLogin) {
        DataStatement dataStatement = new DataStatement(PackageContants.DELETE_N100, OracleTypes.INTEGER, new Param[]{
                    new Param(OracleTypes.INTEGER, pn100),
                    new Param(OracleTypes.CHAR, pnLogin)
                });
        try {
            return super.update(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }
    }

    @Override
    public List<N100> getListCustomer(int pnFH000, int pnFH200, int pnFN600, int pnFK400, int pnFN100, String pvNV103, int pnNN104,
            int pnOFFSET, int pnLIMIT, int pnSORT, int pnDIRECTION, String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_CUSTOMER, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.INTEGER, pnFN600),
                    new Param(OracleTypes.INTEGER, pnFK400),
                    new Param(OracleTypes.INTEGER, pnFN100),
                    new Param(OracleTypes.CHAR, pvNV103),
                    new Param(OracleTypes.INTEGER, pnNN104),
                    new Param(OracleTypes.INTEGER, pnOFFSET),
                    new Param(OracleTypes.INTEGER, pnLIMIT),
                    new Param(OracleTypes.INTEGER, pnSORT),
                    new Param(OracleTypes.INTEGER, pnDIRECTION),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }

    }

    @Override
    public List<N100> getListCustomerById(int pn100, String pvLogin) {
        try {
            DataStatement dataStatement = new DataStatement(PackageContants.LiST_TABN100DE, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pn100),
                        new Param(OracleTypes.CHAR, pvLogin)
                    });
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getSelectItemN550(int pnFH000, int pnFH200, int pnNN554, String pvLogin) {
        try {
            DataStatement dataStatement = new DataStatement(PackageContants.LIST_COMBN550, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),
                        new Param(OracleTypes.INTEGER, pnNN554),
                        new Param(OracleTypes.CHAR, pvLogin)
                    });
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getListCustomerCompany(int pnFH000, int pnFH200, int pnFN100, int pnFK100, int pnNN117,
            String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_CUSTOMER_COMPANY, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.INTEGER, pnFN100),
                    new Param(OracleTypes.INTEGER, pnFK100),
                    new Param(OracleTypes.INTEGER, pnNN117),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }

    }

    @Override
    public int updateColumnN100(String pvSCHEMA, String pvTABNAME, String pvCOLNAME, String pnVALUE, String pvPRIMARYKEY, int pnCONDITION, String pvLOGIN) {
        try {
            DataStatement dateStatement = new DataStatement(PackageContants.ORG_UPDATE_N100, OracleTypes.INTEGER, new Param[]{
                        new Param(OracleTypes.CHAR, pvSCHEMA),
                        new Param(OracleTypes.CHAR, pvTABNAME),
                        new Param(OracleTypes.CHAR, pvCOLNAME),
                        new Param(OracleTypes.CHAR, pnVALUE),
                        new Param(OracleTypes.CHAR, pvPRIMARYKEY),
                        new Param(OracleTypes.INTEGER, pnCONDITION),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.updateNoOutParam(dateStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }

    }

    @Override
    public int updateColumnINT(String pvSCHEMA, String pvTABNAME, String pvCOLNAME, int pnVALUE, String pvPRIMARYKEY, int pnCONDITION, String pvLOGIN) {
        try {
            DataStatement dateStatement = new DataStatement(PackageContants.ORG_UPDATE_INT, OracleTypes.INTEGER, new Param[]{
                        new Param(OracleTypes.CHAR, pvSCHEMA),
                        new Param(OracleTypes.CHAR, pvTABNAME),
                        new Param(OracleTypes.CHAR, pvCOLNAME),
                        new Param(OracleTypes.INTEGER, pnVALUE),
                        new Param(OracleTypes.CHAR, pvPRIMARYKEY),
                        new Param(OracleTypes.INTEGER, pnCONDITION),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.updateNoOutParam(dateStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }

    }

    @Override
    public int update2Column(
            String pvSCHEMA, String pvTABNAME,
            String pvCOLNAME, int pnVALUE, String pvPRIMARYKEY, int pnCONDITION,
            String pvPRIMARYKEY2, int pnCONDITION2, String pvLOGIN) {
        try {
            DataStatement dateStatement = new DataStatement(PackageContants.UPDATE2COL, OracleTypes.INTEGER, new Param[]{
                        new Param(OracleTypes.CHAR, pvSCHEMA),
                        new Param(OracleTypes.CHAR, pvTABNAME),
                        new Param(OracleTypes.CHAR, pvCOLNAME),
                        new Param(OracleTypes.INTEGER, pnVALUE),
                        new Param(OracleTypes.CHAR, pvPRIMARYKEY),
                        new Param(OracleTypes.INTEGER, pnCONDITION),
                        new Param(OracleTypes.CHAR, pvPRIMARYKEY2),
                        new Param(OracleTypes.INTEGER, pnCONDITION2),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.updateNoOutParam(dateStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }

    }
    
    @Override
    public int update2ColumnTAB(
            String pvSCHEMA, String pvTABNAME,
            String pvCOLNAME, String pnVALUE, String pvPRIMARYKEY, int pnCONDITION,
            String pvPRIMARYKEY2, int pnCONDITION2, String pvLOGIN) {
        try {
            DataStatement dateStatement = new DataStatement(PackageContants.UPDATE2COLTAB, OracleTypes.INTEGER, new Param[]{
                        new Param(OracleTypes.CHAR, pvSCHEMA),
                        new Param(OracleTypes.CHAR, pvTABNAME),
                        new Param(OracleTypes.CHAR, pvCOLNAME),
                        new Param(OracleTypes.CHAR, pnVALUE),
                        new Param(OracleTypes.CHAR, pvPRIMARYKEY),
                        new Param(OracleTypes.INTEGER, pnCONDITION),
                        new Param(OracleTypes.CHAR, pvPRIMARYKEY2),
                        new Param(OracleTypes.INTEGER, pnCONDITION2),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.updateNoOutParam(dateStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }

    }

    public List<N100> getListCombN100D(int pnFH000, int pnFH200, int pnFK100, String pvLOGIN) {
        try {
            DataStatement dataStatement = new DataStatement(PackageContants.LIST_COMBN100D, OracleTypes.CURSOR, new Param[]{
                        new Param(OracleTypes.INTEGER, pnFH000),
                        new Param(OracleTypes.INTEGER, pnFH200),
                        new Param(OracleTypes.INTEGER, pnFK100),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    public List<N100> searchListCustomerSGT(int pnFH000, int pnFH200, int TYPESEACH, String KEYSEACH, int offset, int limit, int sort, int direction, String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.SEARCH_CUSTOMERSGT, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.INTEGER, TYPESEACH),
                    new Param(OracleTypes.CHAR, KEYSEACH),
                    new Param(OracleTypes.INTEGER, offset),
                    new Param(OracleTypes.INTEGER, limit),
                    new Param(OracleTypes.INTEGER, sort),
                    new Param(OracleTypes.INTEGER, direction),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }

    }

    public List<N100> searchListCustomerTour(int pnFH000, int pnFH200, String pvVV051, int offset, int limit, int sort, int direction, String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.SEARCH_CUSTOMERTOUR, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.CHAR, pvVV051),
                    new Param(OracleTypes.INTEGER, offset),
                    new Param(OracleTypes.INTEGER, limit),
                    new Param(OracleTypes.INTEGER, sort),
                    new Param(OracleTypes.INTEGER, direction),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }

    }

    public List<N100> searchListCustomer(int pnFH000, int pnFH200, int pnFK400, String pvNV101, String pvSEARC, String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.SEARCH_CUSTOMER, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.INTEGER, pnFK400),
                    new Param(OracleTypes.CHAR, pvNV101),
                    new Param(OracleTypes.CHAR, pvSEARC),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }

    }

    public List<N100> removeListCustomer(int pnFH000, int pnFH200, int pnFK400, String pvKV451, String pvSEARC, String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.REMOVE_CUSTOMER, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.INTEGER, pnFK400),
                    new Param(OracleTypes.CHAR, pvKV451),
                    new Param(OracleTypes.CHAR, pvSEARC),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }

    }

    public List<N100> TourHistory(int pnFH000, int pnFH200, int pnFN100, String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.TOUR_HISTORY, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.INTEGER, pnFN100),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }

    }

    @Override
    public List<N100> getListCustomer_NA(int pnFH000, int pnFH200, String pvSEARC, int pnOFFSET, int pnLIMIT, int pnSORT, int pnDIRECTION, String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100_NAME_KHCN, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.CHAR, pvSEARC),
                    new Param(OracleTypes.INTEGER, pnOFFSET),
                    new Param(OracleTypes.INTEGER, pnLIMIT),
                    new Param(OracleTypes.INTEGER, pnSORT),
                    new Param(OracleTypes.INTEGER, pnDIRECTION),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getListCustomer_MO(int pnFH000, int pnFH200, String pvSEARC, int pnOFFSET, int pnLIMIT, int pnSORT, int pnDIRECTION, String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100_EMA_KHCN, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.CHAR, pvSEARC),
                    new Param(OracleTypes.INTEGER, pnOFFSET),
                    new Param(OracleTypes.INTEGER, pnLIMIT),
                    new Param(OracleTypes.INTEGER, pnSORT),
                    new Param(OracleTypes.INTEGER, pnDIRECTION),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getListCustomer_MA(int pnFH000, int pnFH200, String pvSEARC, int pnOFFSET, int pnLIMIT, int pnSORT, int pnDIRECTION, String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100_MOB_KHCN, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.CHAR, pvSEARC),
                    new Param(OracleTypes.INTEGER, pnOFFSET),
                    new Param(OracleTypes.INTEGER, pnLIMIT),
                    new Param(OracleTypes.INTEGER, pnSORT),
                    new Param(OracleTypes.INTEGER, pnDIRECTION),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getdetailEditN100r(int pnFN100, String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100Edit, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFN100),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getListCustomerALL(int pnFH000, int pnFH200, int pnFN100, int pnNI104, String pvNV103, int pnOFFSET, int pnLIMIT, int pnSORT, int pnDIRECTION, String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100_ALL_KHCN, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.INTEGER, pnFN100),
                    new Param(OracleTypes.INTEGER, pnNI104),
                    new Param(OracleTypes.CHAR, pvNV103),
                    new Param(OracleTypes.INTEGER, pnOFFSET),
                    new Param(OracleTypes.INTEGER, pnLIMIT),
                    new Param(OracleTypes.INTEGER, pnSORT),
                    new Param(OracleTypes.INTEGER, pnDIRECTION),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getListN100DifK100(int pnFH000, int pnFH200, int pnFN100, int pnFK100, int pnOFFSET, int pnLIMIT, String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100_ORTHER_K100, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.INTEGER, pnFN100),
                    new Param(OracleTypes.INTEGER, pnFK100),
                    new Param(OracleTypes.INTEGER, pnOFFSET),
                    new Param(OracleTypes.INTEGER, pnLIMIT),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public int updateFK100OneColumn(int pnPN100, int pnFK100, String pvLOGIN) {
        try {
            DataStatement dateStatement = new DataStatement(PackageContants.UPDATE_FK100_ONE_COLUMN, OracleTypes.INTEGER, new Param[]{
                        new Param(OracleTypes.CHAR, pnPN100),
                        new Param(OracleTypes.CHAR, pnFK100),
                        new Param(OracleTypes.CHAR, pvLOGIN)
                    });
            return super.update(dateStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }

    }

    @Override
    public List<N100> getListN100ID(int pnFH000, int pnFH200, int pnFN100, String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100_DASHBOARD, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.INTEGER, pnFN100),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getListCustomer_PA(int pnFH000, int pnFH200, String pvSEARC, int pnOFFSET, int pnLIMIT, int pnSORT, int pnDIRECTION, String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_K100PASS, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                   
                    new Param(OracleTypes.CHAR, pvSEARC),
                    new Param(OracleTypes.INTEGER, pnOFFSET),
                    new Param(OracleTypes.INTEGER, pnLIMIT),
                    new Param(OracleTypes.INTEGER, pnSORT),
                    new Param(OracleTypes.INTEGER, pnDIRECTION),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getListCustomer_COMPANY(int pnFH000, int pnFH200, String pvSEARC, int pnOFFSET, int pnLIMIT, int pnSORT, int pnDIRECTION, String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100_COMPANY_KHCN, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.CHAR, pvSEARC),
                    new Param(OracleTypes.INTEGER, pnOFFSET),
                    new Param(OracleTypes.INTEGER, pnLIMIT),
                    new Param(OracleTypes.INTEGER, pnSORT),
                    new Param(OracleTypes.INTEGER, pnDIRECTION),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    public List<N100> getListCustomerBirthdaySendMail(int pnFH000,
            int pnFH200,
            String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_TABM275SN, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.CHAR, pvLOGIN)});
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    public List<N100> getListCustomerBirthdaySendSMS(int pnFH000,
            int pnFH200,
            String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_TABM275SMS, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.CHAR, pvLOGIN)});
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getListCustomerNoGroup(int pnFH000, int pnFH200, int pnFN600, int pnFN450, int pnFN850, int pnFK400, String pvKV451, String keySearch, int pnOFFSET, int pnLIMIT, int pnSORT, int pnDIRECTION, String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100_NOGROUP, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.INTEGER, pnFN600),
                    new Param(OracleTypes.INTEGER, pnFN450),
                    new Param(OracleTypes.INTEGER, pnFN850),
                    new Param(OracleTypes.INTEGER, pnFK400),
                    new Param(OracleTypes.CHAR, pvKV451),
                    new Param(OracleTypes.CHAR, keySearch),
                    new Param(OracleTypes.INTEGER, pnOFFSET),
                    new Param(OracleTypes.INTEGER, pnLIMIT),
                    new Param(OracleTypes.INTEGER, pnSORT),
                    new Param(OracleTypes.INTEGER, pnDIRECTION),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getListCustomerALL1(int pnFH000, int pnFH200, int pnFN100, int pnFK400, int pnNI104, String pvNV103, int pnOFFSET, int pnLIMIT, int pnSORT, int pnDIRECTION, String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100_ALL_KHCN1, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.INTEGER, pnFN100),
                    new Param(OracleTypes.INTEGER, pnFK400),
                    new Param(OracleTypes.INTEGER, pnNI104),
                    new Param(OracleTypes.CHAR, pvNV103),
                    new Param(OracleTypes.INTEGER, pnOFFSET),
                    new Param(OracleTypes.INTEGER, pnLIMIT),
                    new Param(OracleTypes.INTEGER, pnSORT),
                    new Param(OracleTypes.INTEGER, pnDIRECTION),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getListN100NC144(int pn100, String pvLogin) {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_NC144, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pn100),
                    new Param(OracleTypes.CHAR, pvLogin)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getListCustomerLDAYS(int pnFH000, int pnFH200, int pnLDAYS, int pnOFFSET, int pnLIMIT, int pnSORT, int pnDIRECTION, String pvLOGIN) {
       DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100_ALL_HIS, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.INTEGER, pnLDAYS),

                    new Param(OracleTypes.INTEGER, pnOFFSET),
                    new Param(OracleTypes.INTEGER, pnLIMIT),
                    new Param(OracleTypes.INTEGER, pnSORT),
                    new Param(OracleTypes.INTEGER, pnDIRECTION),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }
    @Override
    public List<N100> getListCustomerDLDAYS(int pnFH000, int pnFH200, int pnLDAYS, int pnOFFSET, int pnLIMIT, int pnSORT, int pnDIRECTION, String pvLOGIN) {
       DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100_ALL_HIS, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.INTEGER, pnLDAYS),

                    new Param(OracleTypes.INTEGER, pnOFFSET),
                    new Param(OracleTypes.INTEGER, pnLIMIT),
                    new Param(OracleTypes.INTEGER, pnSORT),
                    new Param(OracleTypes.INTEGER, pnDIRECTION),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> LISTOFTABN100STA(int pnFH000, int pnFH200, int pnPN100, int pnNN104, int pnFK330, Date pdMONFR, Date pdMONTO, int pnOFFSET, int pnLIMIT, int pnSORT, int pnDIRECTION, String pvLOGIN) {
         DataStatement dataStatement = new DataStatement(PackageContants.LIST_N100_STA, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.INTEGER, pnPN100),
                    new Param(OracleTypes.INTEGER, pnNN104),
                    new Param(OracleTypes.INTEGER, pnFK330),
                    new Param(OracleTypes.DATE, pdMONFR),
                    new Param(OracleTypes.DATE, pdMONTO),
             
                    new Param(OracleTypes.INTEGER, pnOFFSET),
                    new Param(OracleTypes.INTEGER, pnLIMIT),
                    new Param(OracleTypes.INTEGER, pnSORT),
                    new Param(OracleTypes.INTEGER, pnDIRECTION),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(EmployeeStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }

    @Override
    public List<N100> getReport_listoftabN100(int pnFH000, int pnFH200, int pnLDAYS, Date pdFRDAT, Date pdTODAT, int pnOFFSET, int pnLIMIT, int pnSORT, int pnDIRECTION, String pvLOGIN) {
        DataStatement dataStatement = new DataStatement(PackageContants.report_listoftabn100, OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.INTEGER, pnLDAYS),
                    new Param(OracleTypes.DATE, pdFRDAT),
                    new Param(OracleTypes.DATE, pdTODAT),
                    new Param(OracleTypes.INTEGER, pnOFFSET),
                    new Param(OracleTypes.INTEGER, pnLIMIT),
                    new Param(OracleTypes.INTEGER, pnSORT),
                    new Param(OracleTypes.INTEGER, pnDIRECTION),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        try {
            return super.find(dataStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (InstantiationException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (IllegalAccessException ex) {
            Logger.getLogger(CustomerStore.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }
}
